package com.lyh.hkcloud.util.base;

import java.util.List;

public class ConvertUtil {
    public static String toString(List<String> list) {
        if (list == null) {
            return null;
        }
        StringBuilder result = new StringBuilder();
        boolean first = true;
        //第一个前面不拼接","
        for (String string : list) {
            if (first) {
                first = false;
            } else {
                result.append(",");
            }
            result.append(string);
        }
        return result.toString();
    }

    public static boolean isEmpty(Object obj) {
        if (obj == null || "".equals(obj.toString().trim())) {
            return true;
        }
        return false;
    }

    public static boolean isNotEmpty(Object obj) {
        return !isEmpty(obj);
    }
}
